{template "content","header"}
{pc:comment action="get_comment" commentid="$commentid"}
{php $comment = $data;}
{/pc}
<!--网站容器-->
<div class="container">
<div class="content-box box">
	 		<div class="title">
	 			<h2>评论详情</h2>
	 			<span class="title-right">
	 				当前位置：<a href="{SITE_URL}">首页</a>&gt; <a href="{if $comment['url']}{$comment['url']}{else}{$url}{/if}">{if $comment['title']}{$comment['title']}{else}{$title}{/if}</a> &gt; 评论详情
	 			</span>
	 		</div>
	 		<div class="comment-more">
	 			<h1><a href="{if $comment['url']}{$comment['url']}{else}{$url}{/if}">{if $comment['title']}{$comment['title']}{else}{$title}{/if}</a></h1>
	 			<div class="comment-more-box">
	 				<div class="comment-list-top">共{if $comment['total']}{$comment['total']}{else}0{/if}条评论已通过审核<span class="comment-explain">(以下网友评论只代表网友个人观点，不代表本站观点)</span></div>
	 				{pc:comment action="lists" commentid="$commentid" siteid="$siteid" page="$_GET['page']" hot="$hot" num="20"}
	 				<div class="comment-list-body">
	 				<ul>
	 					{loop $data $r}
	 					<li>
	 						<a class="user_pic"><img src="{get_memberavatar($r['userid'])}" height="35" width="35"></a>
	 						<div class="comm-right">
	 							<a class="user_name">{if $r['userid']}{get_nickname($r['userid'])}{else}{$r['username']}{/if}</a>
	 							<p>{stripcslashes($r['content'])}</p>
	 							<p>{direction($r['direction'])}<span class="comm_time">{format::date($r['creat_at'], 1)}</span> <a href="javascript:reply('{$r['id']}', '{$commentid}');" class="comm_a">回复</a> <a href="javascript:void(0)" onclick="support({$r['id']}, '{$commentid}')" class="comm_a">支持</a>（<font id="support_{$r['id']}">{$r['support']}</font>）</p>
	 							<div id="reply_{$r['id']}" class="none"></div>
	 						</div>
	 					</li>
	 					{/loop}
	 					{if empty($data)}<li>这篇文章还没有收到评论，赶紧来抢沙发吧~</li>{/if}
	 				</ul>
	 				</div>

	 				<div id="page">
	 					{$pages}
	 				</div>
					{/pc}

	 				<div class="title">
	 					<h2>我要来说两句</h2>
	 				</div>
	 				<div class="comment-box">
	 					<div class="comment-form">
	 					<form action="{APP_PATH}index.php?m=comment&c=index&a=post&commentid={$commentid}" method="post">
	 					<input type="hidden" name="title" value="{urlencode(($comment['title'] ? $comment['title'] : $title))}">
	 					<input type="hidden" name="url" value="{urlencode(($comment['url'] ? $comment['url'] : $url))}">
						<div class="posn">我的态度：<input type="radio" name="direction" value="1" /> <img src="{IMG_PATH}icon/zheng.png" /> <input type="radio" name="direction" value="2" /> <img src="{IMG_PATH}icon/fan.png" /> <input type="radio" name="direction" value="3"  /> <img src="{IMG_PATH}icon/zhong.png" /></div>
						<div class="line"></div>
	 					<textarea class="textarea" id="content" name="content" placeholder="我来说两句~"></textarea>
						{if $setting['code']}
						<div class="line"></div>
						<label>验证码：<input type="text" name="code" class="input-text" id="yzmText" onfocus="var offset = $(this).offset();$('#yzm').css({'left': +offset.left-190, 'top': +offset.top-810});$('#yzm').show();$('#yzmText').data('hide', 1)" onblur='$("#yzmText").data("hide", 0);setTimeout("hide_code()", 3000)' /></label>
						<div id="yzm" class="yzm">{form::checkcode()}<br />点击图片更换</a></div>
						<div class="line"></div>
						{/if}
	 					<p><input type="submit" class="comment-submit" name="dosubmit" value="发表评论">&nbsp;&nbsp;&nbsp;&nbsp;{if $userid}{get_nickname()} <a href="{APP_PATH}index.php?m=member&c=index&a=logout&forward={urlencode(trim(FC_NOW_HOST, '/').WEB_PATH)}">退出</a>{else}<a href="{APP_PATH}index.php?m=member&c=index&a=login&forward={urlencode(trim(FC_NOW_HOST, '/').WEB_PATH)}" class="blue">登录</a><span> | </span><a href="{APP_PATH}index.php?m=member&c=index&a=register" class="blue">注册</a>  {if !$setting['guest']}<span style="color:red">需要登陆才可发布评论</span>{/if}{/if}</p>
	 					</form>
	 					</div>
	 				</div>
	 			</div>
	 		</div>
		 </div>
</div>
<style type="text/css">
.look-content{ padding:10px;border:1px dashed #ffbf7a; background:#fffced; margin:10px auto;display:none;}
.look-content ul{ color:#666}
</style>
            <div class="look-content">
            <h6>请您注意：</h6>
                <ul>
                    <li>自觉遵守：爱国、守法、自律、真实、文明的原则</li>
                    <li>尊重网上道德，遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法规</li>
                    <li>严禁发表危害国家安全，破坏民族团结、国家宗教政策和社会稳定，含侮辱、诽谤、教唆、淫秽等内容的作品</li>
                    <li>承担一切因您的行为而直接或间接导致的民事或刑事法律责任</li>
                    <li>您在本站评论发表的作品，本站有权在网站内保留、转载、引用或者删除</li>
                    <li>参与本评论即表明您已经阅读并接受上述条款</li>
                </ul>
            </div>
<script type="text/javascript">
function support(id, commentid) {
	$.getJSON('{APP_PATH}index.php?m=comment&c=index&a=support&format=jsonp&commentid='+commentid+'&id='+id+'&callback=?', function(data){
		if(data.status == 1) {
			$('#support_'+id).html(parseInt($('#support_'+id).html())+1);
		} else {
			alert(data.msg);
		}
	});
}

function reply(id,commentid) {
	var str = '<form action="{APP_PATH}index.php?m=comment&c=index&a=post&commentid='+commentid+'&id='+id+'" method="post"><textarea class="textarea" id="content" name="content" placeholder="我来说两句~"></textarea>{if $setting['code']}<div class="line"></div><label>验证码：<input type="text" name="code"  class="input-text" onfocus="var offset = $(this).offset();$(\'#yzm\').css({\'left\': +offset.left-190, \'top\': +offset.top-810});$(\'#yzm\').show();$(\'#yzmText\').data(\'hide\', 1)" onblur=\'$("#yzmText").data("hide", 0);setTimeout("hide_code()", 3000)\' /></label><div class="line"></div>{/if}  <p><input type="submit" class="comment-submit" name="dosubmit" value="发表评论">&nbsp;&nbsp;&nbsp;&nbsp;{if $userid}{get_nickname()} <a href="{APP_PATH}index.php?m=member&c=index&a=logout&forward={urlencode(trim(FC_NOW_HOST, '/').WEB_PATH)}">退出</a>{else}<a href="{APP_PATH}index.php?m=member&c=index&a=login&forward={urlencode(trim(FC_NOW_HOST, '/').WEB_PATH)}" class="blue">登录</a> | <a href="{APP_PATH}index.php?m=member&c=index&a=register" class="blue">注册</a>  {if !$setting['guest']}<span style="color:red">需要登陆才可发布评论</span>{/if}{/if}</p></form>';
	$('#reply_'+id).html(str).toggle();
}

function hide_code() {
	if ($('#yzmText').data('hide')==0) {
		$('#yzm').hide();
	}
}
</script>
{template "content","footer"}